import request from '@/utils/request'

// 查询通用数据源定义列表
export function listDbDataSource(query) {
  return request({
    url: '/basic/dbDataSource/list',
    method: 'get',
    params: query
  })
}

// 查询通用数据源定义详细
export function getDbDataSource(dataSourceId) {
  return request({
    url: '/basic/dbDataSource/' + dataSourceId,
    method: 'get'
  })
}

// 新增通用数据源定义
export function addDbDataSource(data) {
  return request({
    url: '/basic/dbDataSource',
    method: 'post',
    data: data
  })
}

// 修改通用数据源定义
export function updateDbDataSource(data) {
  return request({
    url: '/basic/dbDataSource',
    method: 'put',
    data: data
  })
}

// 删除通用数据源定义
export function delDbDataSource(dataSourceId) {
  return request({
    url: '/basic/dbDataSource/' + dataSourceId,
    method: 'delete'
  })
}
